﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WDA.Config
{
	/// <summary>
	/// Describes single WDAB service.
	/// </summary>
	public interface IService
	{
		/// <summary>
		/// Gtes name of the service. Name must be unique in the environment.
		/// </summary>
		string Name { get; }
		/// <summary>
		/// Gets service URL. If not specified (null), service address is dynamicaly composed from host base address
		/// and service name.
		/// </summary>
		string Uri { get; }
		/// <summary>
      /// Gets service monitor URL. If not specified (null), service address is dynamicaly composed from host base address
      /// and service name.
		/// </summary>
		string MonitorUri { get; }
		/// <summary>
		/// Gets name of service contract's CLR type.
		/// </summary>
		string InterfaceName { get; }
		/// <summary>
		/// Gets name of service implementation's CLR type.
		/// </summary>
		string ImplementationName { get; }
		/// <summary>
		/// Gets CLR type of service monitor (not monitor contract type!).
		/// </summary>
		string MonitorInterfaceName { get; }
		/// <summary>
		/// Gets base service TCP port (monitor port is calculated using base service port).
		/// </summary>
		int? BasePort { get; }
		/// <summary>
		/// Returns reference to node hosting this service.
		/// </summary>
		IHost Host { get; }
	}
}
